wayland: Stop using the query_state vfunc
authorMatthias Clasen <mclasen@redhat.com>
Wed, 26 Aug 2020 20:04:25 +0000 (16:04 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 26 Aug 2020 21:56:41 +0000 (17:56 -0400)
Just call the backend implementation directly.

gdk/wayland/gdkdevice-wayland-private.h [new file with mode: 0644]
gdk/wayland/gdkdevice-wayland.c
gdk/wayland/gdksurface-wayland.c

diff --git a/gdk/wayland/gdkdevice-wayland-private.h b/gdk/wayland/gdkdevice-wayland-private.h
new file mode 100644 (file)
index 0000000..a1942fb
--- /dev/null
@@ -0,0 +1,14 @@
+#ifndef __GDK_DEVICE_WAYLAND_PRIVATE_H__
+#define __GDK_DEVICE_WAYLAND_PRIVATE_H__
+
+#include "gdkwaylanddevice.h"
+
+void
+gdk_wayland_device_query_state (GdkDevice        *device,
+                                GdkSurface       *surface,
+                                GdkSurface      **child_surface,
+                                double           *win_x,
+                                double           *win_y,
+                                GdkModifierType  *mask);
+
+#endif
index 44362692170fefdefd7eed08ed9ea15bf68dc36f..f55a593ba485daabd8ee2950f4bc15934f79a7d4 100644 (file)
@@ -35,6 +35,7 @@
 #include "gdkdeviceprivate.h"
 #include "gdkdevicepadprivate.h"
 #include "gdkdevicetoolprivate.h"
+#include "gdkdevice-wayland-private.h"
 #include "gdkdropprivate.h"
 #include "gdkprimary-wayland.h"
 #include "gdkseatprivate.h"
@@ -517,7 +518,7 @@ device_get_modifiers (GdkDevice *device)
   return mask;
 }
 
-static void
+void
 gdk_wayland_device_query_state (GdkDevice        *device,
                                 GdkSurface       *surface,
                                 GdkSurface      **child_surface,
@@ -796,7 +797,6 @@ gdk_wayland_device_class_init (GdkWaylandDeviceClass *klass)
   GdkDeviceClass *device_class = GDK_DEVICE_CLASS (klass);
 
   device_class->set_surface_cursor = gdk_wayland_device_set_surface_cursor;
-  device_class->query_state = gdk_wayland_device_query_state;
   device_class->grab = gdk_wayland_device_grab;
   device_class->ungrab = gdk_wayland_device_ungrab;
   device_class->surface_at_position = gdk_wayland_device_surface_at_position;
index a444a4ee44d1738b8172a785a54a91fed106b1c7..b6ff57a5b04d27069947abce2749e09d0302938e 100644 (file)
@@ -36,6 +36,7 @@
 #include "gdkseat-wayland.h"
 #include "gdksurfaceprivate.h"
 #include "gdktoplevelprivate.h"
+#include "gdkdevice-wayland-private.h"
 
 #include <wayland/xdg-shell-unstable-v6-client-protocol.h>
 
@@ -3179,9 +3180,7 @@ gdk_wayland_surface_get_device_state (GdkSurface       *surface,
     {
       GdkSurface *child;
 
-      GDK_DEVICE_GET_CLASS (device)->query_state (device, surface,
-                                                  &child,
-                                                  x, y, mask);
+      gdk_wayland_device_query_state (device, surface, &child, x, y, mask);
       return_val = (child != NULL);
     }